package day05;
/*
    比较两个数据是否相等，参数类型分别为
        两个byte类型，两个short类型，两个int类型，两个long 类型
    并在main方法中进行测试
 */
public class FunctionDemo6 {
    public static void main(String[] args) {

        byte mbyte1 = 3;
        byte mbyte2 = 4;
        System.out.println(bytecompare(mbyte1,mbyte2));
        System.out.println("-------------------------");
        short mshort1 = 3;
        short mshort2 = 4;
        System.out.println(shortcompare(mshort1,mshort2));
        System.out.println("-------------------------");
        int mint1 = 5;
        int mint2 = 6;
        System.out.println(intcompare(mint1,mint2));
        System.out.println("-------------------------");
        long mlong1 = 6;
        long mlong2 = 6;
        System.out.println(longcompare(mlong1,mlong2));
        System.out.println("-------------------------");
    }

    //byte
    public static boolean bytecompare(byte a,byte b){
        System.out.println("byte");
        return a == b;
    }

    //short
    public static boolean shortcompare(short a,short b){
        System.out.println("short");
        return a == b;
    }

    //int
    public static boolean intcompare(int a,int b){
        System.out.println("int");
        return a == b;
    }

    //long
    public static boolean longcompare(long a,long b){
        System.out.println("long");
        return a == b;
    }
}
